package com.ruoyi.common.utils.file.transfer;

import java.util.Map;

/**
 * File远程传输工厂，分发传输协议
 *
 * @author ysz
 * @date 2024/1/31 19:09
 */
public class FileTransferFactory {
    static Map<String, FileTransferUtils> TRANSFER_TYPE = Map.of(
            "scp", new ScpTransferUtil(),
            "ftp", new FtpTransferUtil(),
            "sftp", new SftpTransferUtil()
    );

    public FileTransferUtils getFileTransfer(String transferType) {
        FileTransferUtils fileTransferUtils = TRANSFER_TYPE.get(transferType);
        return fileTransferUtils;
    }
}
